package com.ytxg.api.feign;



import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ytxg.api.po.book.BookComment;
import com.ytxg.api.po.book.BookInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;

@Component
@FeignClient(value = "novel-book")
public interface BookInfoClient {

    @PostMapping("/api/in/get")
    List<BookInfo> getBookInfoList(Collection<Long> bookIds);

    @PostMapping("/api/in/getBookInfoById")
    BookInfo getBookInfoById(Long bookId);

    @PostMapping("/api/in/getBookComment")
    List<BookComment> getBookComment(@RequestParam("userId") Long userId,
                                     @RequestParam("pageNum") Integer pageNum,
                                     @RequestParam("pageSize") Integer pageSize );
}
